﻿using ConfExpert;
using DevExpress.XtraGrid.Views.Grid;

namespace DevTeam
{
    public static class ConfExpertExtensions
    {
        public static void ShowProductIdAsTela(this GridView gridView)
        {
            gridView.MakeColumnInvisible("PRO", "Scan");
            gridView.Columns["ProductId"].Visible = true;
            gridView.Columns["ProductId"].ColumnEdit = RepositoryManager.Get((int)Rp.Tela);
            gridView.Columns["ProductId"].Caption = "Tela";
        }

        public static void ShowProductIdAsKumas(this GridView gridView)
        {
            gridView.Columns["ProductId"].Caption = "Art";
            gridView.Columns["ProductId"].ColumnEdit = RepositoryManager.Get((int)Rp.V_Kumas);
            gridView.MakeColumnVisible("PRO", "Scan");
            gridView.Columns["ProductId"].Visible = false;
        }
    }
}
